package com.recource.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.recource.constant.StaticConstant;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author xjhStart
 * @create 2023-04-30 下午5:42
 */
@Data
@TableName("t_order")
public class Order {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("order_number")
    private String order_number;

    @TableField("coach_id")
    private String coach_id    ;
    @TableField("coach_name")
    private String coach_name  ;
    @TableField("vip_id")
    private String vip_id      ;
    @TableField("vip_name")
    private String vip_name    ;
    @TableField("project_id")
    private String project_id  ;
    @TableField("project_name")
    private String project_name;
    @TableField("product_id")
    private String product_id  ;
    @TableField("product_name")
    private String product_name;

    @TableField("create_time")
    @JsonFormat(pattern = StaticConstant.DATE_FORMAT, timezone = StaticConstant.GMT8)
    @DateTimeFormat(pattern = StaticConstant.DATE_FORMAT)
    private Date create_time ;

    @TableField("price")
    private BigDecimal price;

    @TableField("expiration_time")
    @JsonFormat(pattern = StaticConstant.DATE_FORMAT, timezone = StaticConstant.GMT8)
    @DateTimeFormat(pattern = StaticConstant.DATE_FORMAT)
    private Date expirationTime;

}
